package com.itheima.pojo;

import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import javax.persistence.Id;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@Document(indexName = "bloginfo", type = "docs")
public class BlogInfo  implements Serializable {

    @Id
    @Field(index = true, store = true, type = FieldType.Keyword)
    private Long id;

    @Field(index = true, store = true, type = FieldType.Text)
    private String uid;

    @Field(index = true, store = true, type = FieldType.Text, analyzer = "ik_smart")
    private String summary;

    @Field(index = true, store = true, type = FieldType.Text, analyzer = "ik_smart")
    private String title;

    @Field(index = true, store = true, type = FieldType.Text)
    private String blogSortName;

    @Field(index = true, store = true, type = FieldType.Text)
    private String blogSortUid;

    @Field(index = true, store = true, type = FieldType.Date)
    private Date createTime;

    @Field(index = true, store = true, type = FieldType.Integer)
    private Integer isPublish;

    @Field(index = true, store = true, type = FieldType.Text)
    private String author;

    @Field(index = true, store = true, type = FieldType.Text)
    private String photoUrl;

    @Field(index = true, store = true, type = FieldType.Text)
    private String tagUidList;

    @Field(index = true, store = true, type = FieldType.Text)
    private String tagNameList;

}
